package cn.huiyunche.base.service.enums;

/**
 * 支付类型枚举
 *
 * @author liangpeng
 */
public enum PayTypeEnum {
    Alpay("Alipay", "支付宝支付"),
    WechatPay("Wechat", "微信支付"),
    ScorePay("Score", "积分支付");

    private final String value;
    private final String text;

    PayTypeEnum(String value, String text) {
        this.value = value;
        this.text = text;
    }

    public String getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static PayTypeEnum getByValue(String value) {
        for (PayTypeEnum temp : PayTypeEnum.values()) {
            if (temp.getValue().equals(value)) {
                return temp;
            }
        }
        return null;
    }
}
